package com.tricode.ile.training.task.sl275.lab7;

import java.util.ArrayList;

public class Customer {

    private String firstName;
    private String lastName;
    private Account account;
    private ArrayList<SavingsAccount> savingsAccounts = new ArrayList<SavingsAccount>();
    private ArrayList<CheckingAccount> checkingAccounts = new ArrayList<CheckingAccount>();

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public Customer(String firstName, String lastName) {
        this.firstName = firstName;
        this.lastName = lastName;
    }

    public void addAccount(SavingsAccount savingsAccount) {
        this.savingsAccounts.add(savingsAccount);
    }

    public void addAccount(CheckingAccount checkingAccount) {
        this.checkingAccounts.add(checkingAccount);
    }

    public SavingsAccount getAccount(int i) {
        return savingsAccounts.get(i);
    }
}

